package com.ms.demo.demo2;


/**
 * @description: 创建具体访问者B
 * @author: ms
 * @create: 2022-10-28 10:29
 */
public class ConcreteVisitorB implements IVisitor{

    public void visit(ConcreteElementA element) {
        String result = element.get();
        System.out.println("具体访问者ConcreteVisitorB,访问结果： " + result);
    }


    public void visit(ConcreteElementB element) {
        String result = element.get();
        System.out.println("具体访问者ConcreteVisitorB,访问结果： " + result);
    }

}